import { Form, Input, Checkbox } from 'antd';
const { Search } = Input;
export const CardFormInput = ({ showFlag, name, require, message, prefix, placeholder }) => {
    if (showFlag) {
        return (
            <Form.Item
                name={name}
                rules={[{ required: { require }, message: { message } }]}
            >
                <Input prefix={prefix} placeholder={placeholder} />
            </Form.Item>
        );
    };
};
export const CardFormValid = ({ showFlag, name, rules, placeholder, enterButton, search }) => {
    if (showFlag) {
        return (
            <Form.Item
                name={name}
                rules={rules}
            >
                <Search
                    placeholder={placeholder}
                    allowClear
                    enterButton={enterButton}
                    size="large"
                    onSearch={search}
                />
            </Form.Item>
        );
    }
}
export const CardFormAgree = ({ status,click }) => {
    if (status === 3) {
        return (
            <Form.Item>
                <Form.Item name="agree" valuePropName="checked" noStyle rules={[{ required: true, message: 'Please agree to the terms of service!' }]}>
                    <Checkbox>我同意<a onClick={click}>发布低质文章处理</a>规范</Checkbox>
                </Form.Item>
            </Form.Item>
        );
    }
}
export const CardFormForgetPassword = ({ showflag, click }) => {
    if (showflag) {
        return (
            <>
                <a onClick={click} >忘记密码</a>
            </>
        );
    }
}